package com.cskaoyan.service.wx;

import com.cskaoyan.bean.po.MarketAddress;
import com.cskaoyan.bean.po.MarketCart;
import com.cskaoyan.bean.wx.cart.UserAvailableCoupon;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;


public interface WxCartService {

    List<MarketCart> queryCartListByUserId(Integer userId);

    Integer updateChecked(Integer userId, Integer productId, Integer isChecked);

    Boolean isCartExist(Integer userId, Integer goodsId, Integer productId);

    Integer updateCart(Integer userId, Integer goodsId, Integer productId, Integer number);

    Integer addCart(Integer userId, Integer goodsId, Integer productId, Integer number);

    MarketAddress queryDefaultAddressByUserId(Integer userId);

    List<MarketCart> queryCartListByUserIdAndChecked(Integer userId, boolean checked);

    List<UserAvailableCoupon> queryUserCouponByUserId(Integer userId);

    Integer updateCartById(Integer cartId, Integer number);

    Integer deleteCartByUserIdAndProductIds(@Param("userId") Integer userId, @Param("productIds") ArrayList<Integer> productIds);

    MarketCart queryCartByGoodsIdAndProductId(@Param("goodsId") Integer goodsId, @Param("productId") Integer productId);

    Integer addCartByMarketCart(MarketCart marketCart);

    MarketAddress queryAddressByAddressId(Integer addressId);
}
